package com.example.demo.controller;

import com.example.demo.domain.dto.OrderDTO;
import com.example.demo.domain.vo.OrderVO;
import com.example.demo.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 指令
 * @author kisofdeath
 * @date 2022-05-11 12:28
 */
@CrossOrigin
@RestController
@RequestMapping("/_api/order")
public class OrderController {
	@Autowired
	private OrderService orderService;

	@PostMapping()
	public OrderVO order(@RequestBody OrderDTO dto) throws Exception {
		return orderService.order(dto);
	}

}
